<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8"/>
    <title>Richzoo 众筹</title>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <meta name="viewport" content="width=device-width"/>
    <link rel="stylesheet" href="/style/home/bootstrap.css"/>
    <link rel="stylesheet" href="/style/home/common.css"/>
    <link rel="stylesheet" href="/style/home/jquery.validator.css"/>
    <link rel="stylesheet" href="/javascript/home/webuploader/webuploader.css"/>
    <script type="text/javascript" src="/javascript/home/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="/javascript/home/bootstrap.min.js"></script>
    <script type="text/javascript" src="/javascript/home/jquery.validator.js"></script>
    <script type="text/javascript" src="/javascript/home/zh_CN.js"></script>
    <script type="text/javascript" src="/javascript/home/webuploader/webuploader.min.js"></script>
    <script type="text/javascript" src="/javascript/home/esl.js"></script>
    <!--[if lte IE 6]>
    <link rel="stylesheet" href="/style/home/bootstrap-ie6.css">
    <![endif]-->
    <!--[if lte IE 7]>
    <link rel="stylesheet" href="/style/home/ie.css">
    <![endif]-->
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="/javascript/home/html5.js"></script>
    <script src="/javascript/home/respond.min.js"></script>
    <![endif]-->
    <link rel="shortcut icon" href="/images/home/favicon.ico"/>
    <link rel="apple-touch-icon" href="/images/home/touchicon.png"/>
</head>
<body>
<!--header-->
<div class="top-header">
    <div class="clearfix container">
        <!-- >768 nav-->
        <div class="row hidden-xs">
            <div class="logo col-xs-3">
                <a href="/">
                    <img src="<?php echo ($config["SITE_LOGO"]); ?>" class="col-xs-12"/>
                </a>
            </div>
            <div class="wrap-nav col-xs-6">
                <ul class="clearfix" id="nav-list">
                    <li>
                        <a href="/">首页</a>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">项目浏览<i class="icon-chevron-down">向下</i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <?php if(is_array($deal_cate_list)): foreach($deal_cate_list as $key=>$vo): ?><li><a href="/list/?id=<?php echo ($vo["id"]); ?>" title="<?php echo ($vo["name"]); ?>"><?php echo ($vo["name"]); ?></a></li><?php endforeach; endif; ?>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="/user.html" class="dropdown-toggle" data-toggle="dropdown">我的众筹<i class="icon-chevron-down">向下</i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="/user.html">我的众筹</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="/project/add.html">发起项目</a>
                    </li>
                    <li>
                        <a href="/help/about.html">新手帮助</a>
                    </li>
                </ul>
            </div>
            <div class="user col-xs-3">
                <?php if(empty($user["user_name"])): ?><a data-toggle="modal" class="pull-right  " id="reg-btn" onclick="code('.code-reg')" data-target="#reg_dialog">注册</a>
                    <a data-toggle="modal" id="login-btn" onclick="code('.code-login')" class="pull-right mr20" data-target="#login_dialog">登录</a>
                    <?php else: ?>
                    <a href="/user/logout" class="user-name pull-right">退出</a>
                    <a href="/user.html" class="pull-right mr20"><?php echo ($user["user_name"]); ?></a>
                    <!--<div class="user-img visible-lg ">-->
                        <!--<a href="/user.html"><div class="user-img-bg"></div>-->
                            <!--<?php if(empty($user["avatar"])): ?><img src="/images/avatar/noavatar_small.gif" /><?php else: ?><img src="<?php echo ($user["avatar_small"]); ?>" /><?php endif; ?>-->
                    <!--</div>--><?php endif; ?>
            </div>
        </div>
        <!-- <768 nav-->
        <div class="row visible-xs">
            <div class="logo">
                <a href="/">
                    <img src="<?php echo ($config["SITE_LOGO"]); ?>" class="col-xs-4"/>
                </a>
            </div>
            <div class="user col-xs-4 col-xs-offset-4 text-right">
                <?php if(empty($user["user_name"])): ?><a data-toggle="modal" id="reg-btn" onclick="code('.code-reg')" data-target="#reg_dialog">注册</a>
                    <a data-toggle="modal" id="login-btn" onclick="code('.code-login')" class="ml10" data-target="#login_dialog">登录</a>
                    <?php else: ?>
                    <div class="user-img">
                        <a href="/user.html"><div class="user-img-bg"></div>
                            <?php if(empty($user["avatar"])): ?><img src="/images/avatar/noavatar_small.gif" /><?php else: ?><img src="<?php echo ($user["avatar_small"]); ?>" /><?php endif; ?>
                    </div>
                    <a href="/user.html" class="user-name"><?php echo ($user["user_name"]); ?></a><?php endif; ?>
            </div>
        </div>
        <div class="row visible-xs mt5">
            <div class="col-xs-12">
                <ul class="clearfix" id="phone-nav-list">
                    <li class="col-xs-2">
                        <a href="/">首页</a>
                    </li>
                    <li class="dropdown col-xs-3">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">项目浏览<i class="glyphicon glyphicon-chevron-down"></i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <?php if(is_array($deal_cate_list)): foreach($deal_cate_list as $key=>$vo): ?><li><a href="/list/?id=<?php echo ($vo["id"]); ?>" title="<?php echo ($vo["name"]); ?>"><?php echo ($vo["name"]); ?></a></li><?php endforeach; endif; ?>
                        </ul>
                    </li>
                    <li class="col-xs-3">
                        <a href="/user.html" class="dropdown-toggle" data-toggle="dropdown">我的众筹<i class="glyphicon glyphicon-chevron-down"></i> </a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="/user.html">我的众筹</a></li>
                        </ul>
                    </li>
                    <li class="col-xs-2">
                        <a href="/project/add.html">发起项目</a>
                    </li>
                    <li class="col-xs-2">
                        <a href="/help/list.html">新手帮助</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<!--header end-->
<div class="main-container">
    <div class="container">
        <div class="row step-item mb15">
            <div class="col-xs-3 step step1">1.项目信息<i class="ui-icon ui-icon-total ui-icon-rightarrow"></i> </div>
            <div class="col-xs-3 step step2 current">2.回报设置<i class="ui-icon ui-icon-total ui-icon-rightarrow"></i> </div>
            <div class="col-xs-3 step step3">3.发起人信息<i class="ui-icon ui-icon-total ui-icon-rightarrow"></i> </div>
            <div class="col-xs-3 step step4">4.完成</div>
        </div>
        <div class="row">
            <div class="col-lg-8 col-sm-12">
                <div class="left-main">
                    <h1 class="text-center f18 fb gain-main-title">回报设置</h1>
                    <div class="gain-table">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>回报</th>
                                <th>支持金额</th>
                                <th>名额</th>
                                <th>回报内容</th>
                                <th>回报时间</th>
                                <th>运费</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <?php if(is_array($deal_item_list)): $i = 0; $__LIST__ = $deal_item_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                                    <td><?php echo ($i); ?></td>
                                    <td><?php echo ($vo["title"]); ?></td>
                                    <td>￥<?php echo ($vo["price"]); ?></td>
                                    <td><?php if(($vo["is_limit_user"] == 1)): echo ($vo["limit_user"]); ?>名<?php else: ?>不限<?php endif; ?></td>
                                    <td>
                                        <?php echo ($vo["description"]); ?>
                                    </td>
                                    <td>项目结束后<?php echo ($vo["repaid_day"]); ?>天</td>
                                    <td><?php if(($vo["is_delivery"] == 1)): if(($vo["delivery_fee"] == 0.0000)): ?>包邮<?php else: echo ($vo["delivery_fee"]); endif; else: ?>不需快递<?php endif; ?></td>
                                    <td class="text-center">
                                        <button class="ui-btn ui-btn-red btn-gain-red del-payback mb10" key="<?php echo ($vo["id"]); ?>">删除&nbsp;<i class="ui-icon ui-icon-total ui-icon-del"></i> </button>
                                        <button class="ui-btn ui-btn-red btn-gain-red edit-payback mb10" key="<?php echo ($vo["id"]); ?>">编辑&nbsp;<i class="ui-icon ui-icon-total ui-icon-edit"></i> </button>
                                    </td>
                                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                        </table>
                    </div>
                    <div class="add-gain">
                        <button class="ui-btn ui-btn-blue btn-gain add_gain">+&nbsp;添加回报</button>
                    </div>
                    <div class="wrap-step">
                        <a class="ui-btn ui-btn-blue btn-create-red-next mr30" onclick="window.location.href='/Project/edit/id/<?php echo ($deal_item["id"]); ?>'" style="padding: 5px 75px 3px 25px;"><span style="font-size:30px;vertical-align: middle;margin-right: 60px;">&lt</span><span class="text">上一步</span></a>
                        <a class="ui-btn ui-btn-blue btn-create-red-next" onclick="window.location.href='/Project/information/deal_id/<?php echo ($deal_item["id"]); ?>.html'"><span class="text">下一步</span><span class="sign-btn">&gt</span></a>
                    </div>
                </div>
                <div class="wrap-add-gain mt20">
                    <button class="ui-btn ui-btn-blue btn-close" onclick="add_gain('close')">X</button>
                    <h1 class="text-center f18 fb mb30" id="payback-title">添加回报</h1>
                    <div class="gain-form">
                        <form class="ui-form" id="form-payback">
                            <div class="row">
                                <label class="col-xs-2">回报标题：</label>
                                <div class="col-xs-5">
                                    <div class="ipt">
                                        <input type="text" maxlength="20" placeholder="不能超过20个字" name="title">
                                        <input type="hidden" name="id" value="0">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <label class="col-xs-2">支付金额：</label>
                                <div class="col-xs-5">
                                    <div class="ipt">
                                        <input type="text" name="price" class="is_money">
                                    </div>
                                </div>
                                <div class="col-xs-1 unit">元</div>
                            </div>
                            <div class="row">
                                <label class="col-xs-2">回报内容：</label>
                                <div class="col-xs-9">
                                    <div class="wrap-textarea">
                                        <textarea id="gain-textarea" name="description" maxlength="500" placeholder="请填写关于回报或任何你希望项目发起人知道的信息，不多于500字。"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <label class="col-xs-2">添加图片：</label>
                                <input type="hidden" name="deal_id" value="<?php echo ($deal_item["id"]); ?>" class="deal_id">
                                <input type="hidden" name="image[]" class="image1">
                                <input type="hidden" name="image[]" class="image2">
                                <input type="hidden" name="image[]" class="image3">
                                <input type="hidden" name="image[]" class="image4">
                                <div class="ipt col-xs-3 text-center gain-add-img"  id="filePicker" >
                                    <img src="/images/home/add_img_default.png" />
                                </div>
                                <div class="col-xs-6 f14 fc9">支持jpg、jpeg、png、gif格式，大小不超过500kb,最多上传4张。</div>
                            </div>
                            <div class="row">
                                <div class="col-xs-9 col-xs-offset-2 ipt">
                                    <img id="upload_image1" style="width:100px;height:100px;display: none;margin-top: 20px;" class="mr5" src="">
                                    <img id="upload_image2" style="width:100px;height:100px;display: none;margin-top: 20px;" class="mr5" src="">
                                    <img id="upload_image3" style="width:100px;height:100px;display: none;margin-top: 20px;" class="mr5" src="">
                                    <img id="upload_image4" style="width:100px;height:100px;display: none;margin-top: 20px;" src="">
                                </div>
                            </div>
                            <div class="row">
                                <label class="col-xs-2">是否限购：</label>
                                <div class="form-radio col-xs-9">
                                    <div class="ipt">
                                        <div class="col-xs-6">
                                        <span class="ui-radio is_limit_user is_limit_user_1">
                                        <input type="radio" name="is_limit_user" value="1">
                                        </span>
                                            是
                                        </div>
                                        <div class="col-xs-6">
                                        <span class="ui-radio is_limit_user is_limit_user_2">
                                        <input type="radio" name="is_limit_user" value="0" checked>
                                        </span>
                                            否
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row limit_user" style="display: none">
                                <label class="col-xs-2">限定名额：</label>
                                <div class="col-xs-5">
                                    <div class="ipt">
                                        <input type="text" placeholder="“0”为不限名额" name="limit_user">
                                    </div>
                                </div>
                                <div class="col-xs-1 unit">个</div>
                            </div>
                            <div class="row">
                                <label class="col-xs-2">回报类型：</label>
                                <div class="form-radio col-xs-9">
                                    <div class="ipt">
                                        <div class="col-xs-6">
                            <span class="ui-radio repaid_type2">
                            <input type="radio" name="repaid_type"  value="0" checked>
                            </span>
                                            实物回报（需要快递/邮寄）
                                        </div>
                                        <div class="col-xs-6">
                            <span class="ui-radio repaid_type1">
                            <input type="radio" name="repaid_type" value="1">
                            </span>
                                            虚拟回报（不需要快递／邮寄的，电子照片等）
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <label class="col-xs-2">是否配送：</label>
                                <div class="form-radio col-xs-9">
                                    <div class="ipt">
                                        <div class="col-xs-6">
                                        <span class="ui-radio is_delivery is_delivery_1">
                                        <input type="radio" name="is_delivery" value="1">
                                        </span>
                                            是
                                        </div>
                                        <div class="col-xs-6">
                                        <span class="ui-radio is_delivery is_delivery_2">
                                        <input type="radio" name="is_delivery" value="0"  checked>
                                        </span>
                                            否
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row delivery_fee" style="display: none;">
                                <label class="col-xs-2">运费：</label>
                                <div class="col-xs-5">
                                    <div class="ipt">
                                        <input type="text" placeholder="“0”为不收运费" id="delivery_fee" name="delivery_fee" class="is_money">
                                    </div>
                                </div>
                                <div class="col-xs-1 unit">元</div>
                            </div>
                            <div class="row">
                                <label class="col-xs-2">项目回报时间：</label>
                                <div class="text-center pull-left" style="line-height: 30px;font-size: 14px;width: 115px;">项目结束后</div>
                                <div class="col-xs-3">
                                    <div class="ipt">
                                        <input type="text" name="repaid_day" class="is_num" placeholder="输入回报天数">
                                    </div>
                                </div>
                                <div class="col-xs-1 unit">天</div>
                            </div>
                            <div class="row">
                            <label class="col-xs-2">参加见面会：</label>
                            <div class="form-radio col-xs-9">
                            <div class="ipt">
                            <div class="col-xs-6">
                            <span class="ui-radio join_meet1">
                            <input type="radio" name="join_meet" value="1">
                            </span>
                            是
                            </div>
                            <div class="col-xs-6">
                            <span class="ui-radio join_meet2">
                            <input type="radio" name="join_meet" value="0" checked>
                            </span>
                            否
                            </div>
                            </div>
                            </div>
                            </div>
                            <div class="row ui-btn-group">
                                <a class="ui-btn ui-btn-disabled ui-btn-default mr30" onclick="add_gain('close')">取消</a>
                                <a class="ui-btn ui-btn-blue ui-btn-default" id="btn-add-item">保存</a>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <div class="col-lg-4 visible-lg">
                <div class="right-sidebar">
                    <div class="sidebar-top-bg">
                        <h1>温馨提示</h1>
                    </div>
                    <div class="sidebar-main">
                        <img src="/images/home/upload/sidebar_sum.png" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    //    添加关闭回报
    function add_gain(status){
        if(status == 'close'){
            $(".add-gain,.wrap-step").show();
            $(".wrap-add-gain").hide();
            window.location.reload();
        }else{
            $(".add-gain,.wrap-step").hide();
            $(".wrap-add-gain").show();
        }
        upload();
    }
    function upload(){
        var uploader = WebUploader.create({
            auto: true,
            chunked: false,
            method: 'POST',
            disableGlobalDnd: true,
            fileNumLimit: 4,
            //fileSizeLimit: 1024000,
            swf: '/javascript/home/webuploader/Uploader.swf',
            server: '/Project/upload_image',
            pick: '#filePicker',
            accept: {
                title: '选择封面图片',
                extensions: 'gif,jpg,jpeg,png',
                mimeTypes: 'image/*'
            }
        });
        var i = 1;
        uploader.on('uploadSuccess', function (file,response) {
            var data = JSON.parse(response._raw);
            $('#upload_image'+i).show().attr('src',data.result + '?rand='+Math.random());
            $(".image" + i).val(data.result);
            i++;
//            $('input[name=image]').val(data.result);
            uploader.reset();
        });
    }
    function clearForm(formid){
        $(':input',formid)
                .not(':button, :submit, :reset, :hidden')
                .val('')
                .removeAttr('checked')
                .removeAttr('selected');
        $(".ui-radio").removeClass('selected');
        $(".delivery_fee").hide();
        $(".limit_user").hide();
        for(var i =1;i<=4;i++){
            $('#upload_image'+i).hide().attr('src','');
            $(".image" + i).val('');
        }

    }
    $(function(){
        $(".repaid_type1").on('click',function(){
            $(".is_delivery_1").parent().hide();
            $(".is_delivery_2").trigger('click');
//            $(".wrap-voucher").show();
        });
        $(".repaid_type2").on('click',function(){
            $(".is_delivery_1").parent().show();
//            $(".wrap-voucher").hide();
        });
        $(".add_gain").on('click',function(){
            add_gain();
            $("#payback-title").text('添加回报');
            $('[name=id]').val('0');
        });
        $(".is_delivery").on('click',function(){
            var is_delivery = $(this).children('[name=is_delivery]').val();
            if(is_delivery == 1){
                $(".delivery_fee").show();
            }else{
                $("[name=delivery_fee]").val('');
                $(".delivery_fee").hide();
            }
        });
        $(".is_limit_user").on('click',function(){
            var is_limit_user = $(this).children('[name=is_limit_user]').val();
            if(is_limit_user == 1){
                $(".limit_user").show();
            }else{
                $("[name=limit_user]").val('');
                $(".limit_user").hide();
            }
        });
        $("#btn-add-item").on('click',function(){
            if($("[name=title]").val().length<=0){alert("请填写回报标题");return false;}
            if($("[name=price]").val().length<=0){alert("请填写支付金额");return false;}
            if($("#gain-textarea").val().length<=0){alert("请填写回报内容");return false;}
            if($("[name=repaid_day]").val().length<=0){alert("请填写项目回报时间");return false;}
            var db = $("#form-payback").serialize();
            $.post('/Project/save_deal_item',db,function(data){
                alert(data.info);
                if(data.status > 0){
                    window.location.reload();
                }
            },'json')
        });
        $(".del-payback").on('click',function(){
            var _key = $(this).attr('key');
            var r=confirm("您确定删除该选项吗？");
            if (r==true)
            {
                $.post('/Project/del_item',{id:_key},function(json){
                    alert(json.info);
                    if(json.status== 1){
                        window.location.reload();
                    }
                },'json')
            }
        });
        $(".edit-payback").on('click',function(){
            add_gain();
            clearForm("#form-payback");
            var id=$(this).attr('key');
            $("#payback-title").text('编辑回报');
            $('[name=id]').val(id);
            $.post('/Project/edit_item',{id:id},function(json){
                $('[name=title]').val(json.info.title).next('span').remove();
                $('[name=price]').val(json.info.price).next('span').remove();
                $('[name=description]').val(json.info.description).next('span').remove();
                $('[name=repaid_day]').val(json.info.repaid_day).next('span').remove();
                if(json.info.is_limit_user == 1){
                    $('.is_limit_user_1').addClass('selected').children().prop('checked','true');
                    $(".limit_user").show();
                    $('[name=limit_user]').val(json.info.limit_user).next('span').remove();
                }else{
                    $('.is_limit_user_2').addClass('selected').children().prop('checked','true');
                    $('[name=limit_user]').val('');
                }
                if(json.info.is_delivery == 1){
                    $('.is_delivery_1').addClass('selected').children().prop('checked','true');
                    $(".delivery_fee").show();
                    $('[name=delivery_fee]').val(json.info.delivery_fee).next('span').remove();
                }else{
                    $('.is_delivery_2').addClass('selected').children().prop('checked','true');
                    $('[name=delivery_fee]').val('');
                }
                if(json.info.voucher == 1){
                    $('.voucher1').addClass('selected').children().prop('checked','true');
                }else{
                    $('.voucher2').addClass('selected').children().prop('checked','true');
                }
                if(json.info.repaid_type == 1){
                    $('.repaid_type1').addClass('selected').children().prop('checked','true');
                    $(".is_delivery_1").parent().hide()
                }else{
                    $('.repaid_type2').addClass('selected').children().prop('checked','true');
                }
                if(json.info.join_meet == 1){
                    $('.join_meet1').addClass('selected').children().prop('checked','true');
                }else{
                    $('.join_meet2').addClass('selected').children().prop('checked','true');
                }
                if(json.info.image != null){
                    for (var i = 0;i<json.info.image.length;i++){
                        var n = i + 1;
                        $('#upload_image'+n).show().attr('src',json.info.image[i].image + '?rand='+Math.random());
                        $(".image" + n).val(json.info.image[i].image);
                    }
                }
            },'json')
        })
    })
</script>
<div class="wrap-footer">
    <div class="container footer">
        <div class="menu-nav text-center">
            <?php if(is_array($help_list)): $k = 0; $__LIST__ = $help_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k; if(( $k != 1)): ?><span class="menu-nav-split"></span><?php endif; ?>
            <a href="<?php echo ($vo["url"]); ?>"><?php echo ($vo["title"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
        <div class="back-top">
            <img src="/images/home/back_top.png"/>
        </div>
        <div class="info mb15 text-center">
            <span>网络文化经营许可证：文网文[2010]040号</span>
            <span>值电信业务经营许可证：浙B2-20080224-1</span>
            <span>信息网络传播视听节目许可证：1109364号</span>
            <span>互联网违法和不良信息举报电话：0571-81683755</span>
        </div>
        <div class="copy mb15 text-center">
            &copy;&nbsp;&nbsp;2014 RichZoo. All rights reserved. 沪ICP备14018325号 Copyright 2014 锐祁机构
        </div>
    </div>
</div>
<?php if(empty($user_info['user_name'])): ?><!--注册-->
<div class="modal fade" id="reg_dialog" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" id="wrap_reg_dialog">
        <div class="modal-content">
            <button class="ui-btn ui-btn-blue btn-add-close" data-dismiss="modal"onclick="window.location.reload()">x</button>
            <h1 class="add-header">新用户注册</h1>
            <div class="add-content">
                <div class="add-content-form">
                    <form class="ui-form" id="reg-form" autocomplete="off">

                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">邮箱：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="email" placeholder="填写电子邮箱">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">手机号：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="mobile" placeholder="填写手机号">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">密码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="password" name="password" maxlength="16" placeholder="设置密码">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">确认密码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="password" name="re_password" maxlength="16" placeholder="输入同一密码">
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">验证码：</label>
                            <div class="col-xs-3">
                                <div class="ipt lg-code">
                                    <input type="text" name="code" placeholder="请输入图片中的数字">
                                </div>
                            </div>
                            <div class="pull-left">
                                <div class="wrap-code">
                                    <div class="text-center pt5 ml5">
                                        <img class="code-img code-reg" src="/index/verify_code"  alt="验证码">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">短信验证码：</label>
                            <div class="col-xs-3">
                                <div class="ipt lg-code">
                                    <input type="text" name="auth_code" placeholder="输入收到的验证码">
                                </div>
                            </div>
                            <a class="ui-btn ui-btn-blue btn-get-code get-code-reg">获取验证码</a>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2"></label>
                            <div class="form-radio col-xs-4">
                                <div class="ipt">
                                    <div class="col-xs-12">
                                        <span class="ui-radio check-agree"></span>
                                        阅读并同意RichZoo众筹<a href="#" class="fc-blue">《服务协议》</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="add-link text-center mt30">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="register">注册</button>
                    <p class="tips mt10 fc-red f14"></p>
                </div>
            </div>
        </div>
    </div>
</div>
<!--注册end-->
<!--login s-->
<div class="modal fade" id="login_dialog" tabindex="-1" role="dialog"  data-keyboard="false" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" id="wrap_login_dialog">
        <div class="modal-content" id="login-wrap">
            <button class="ui-btn ui-btn-blue btn-add-close" data-dismiss="modal" id="login-close">x</button>
            <h1 class="add-header">用户登录</h1>
            <div class="add-content">
                <div class="add-content-form">
                    <form class="ui-form" id="login-form" autocomplete="off">
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">邮箱：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="username" id="username" placeholder="邮箱">
                                </div>
                                <div class="pl5 mt5" id="goto-reg">没有帐号？去注册</div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">登录密码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="password" name="password" maxlength="16" id="pass" placeholder="输入登录密码">
                                </div>
                                <div class="pl5 mt5" id="link-forget">忘记密码？</div>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">验证码：</label>
                            <div class="col-xs-3">
                                <div class="ipt lg-code">
                                    <input type="text" name="code" maxlength="4" placeholder="请输入图片中的数字">
                                </div>
                            </div>
                            <div class="pull-left">
                                <div class="wrap-code">
                                    <div class="text-center pt5 ml5">
                                        <img class="code-img code-login" src="/index/verify_code" alt="验证码">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <form class="ui-form" id="login-bind-form" autocomplete="off" style="display: none">
                                    <input type="hidden" name="username" id="h-user">
                                    <input type="password" style="display: none" id="h-pass" name="password" maxlength="16" >
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">手机号码：</label>
                            <div class="col-xs-4">
                                <div class="ipt lg-code">
                                    <input type="text" name="mobile" id="phone"  placeholder="输入手机号码">
                                </div>
                            </div>
                            <a class="ui-btn ui-btn-blue btn-get-code get-bind-code">获取验证码</a>
                        </div>
                        <div class="row">
                            <label class="col-xs-2 col-xs-offset-2">短信验证码：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="code" placeholder="请填写收到验证码">
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="add-link text-center mt30 mb30" id="wrap-login">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="login-ajax">登录</button>
                    <p class="login-tips mt10 fc-red f14"></p>
                </div>
                <div class="add-link text-center mt30 mb30" id="wrap-login-bind" style="display: none">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="login-ajax-bind">绑定并登录</button>
                    <p class="login-bind-tips mt10 fc-red f14"></p>
                </div>
            </div>
        </div>
        <div class="modal-content" id="forget-wrap">
            <button class="ui-btn ui-btn-blue btn-add-close" data-dismiss="modal" onclick="window.location.reload()">x</button>
            <h1 class="add-header">找回密码</h1>
            <div class="add-content">
                <div class="add-content-form" style="padding: 40px 0 20px 0">
                    <form class="ui-form" id="forget-form" autocomplete="off">
                        <div class="row">
                            <label class="col-xs-3 col-xs-offset-2">注册邮箱：</label>
                            <div class="col-xs-4">
                                <div class="ipt">
                                    <input type="text" name="email" placeholder="注册邮箱">
                                </div>
                            </div>
                        </div>
                        <!--<div class="row">-->
                            <!--<label class="col-xs-3 col-xs-offset-2">短信验证码：</label>-->
                            <!--<div class="col-xs-3">-->
                                <!--<div class="ipt">-->
                                    <!--<input type="text" name="auth_code" placeholder="输入收到的验证码">-->
                                <!--</div>-->
                            <!--</div>-->
                            <!--<a class="ui-btn ui-btn-blue btn-get-code get-code-lost">获取验证码</a>-->
                        <!--</div>-->
                        <!--<div class="row">-->
                            <!--<label class="col-xs-3 col-xs-offset-2">新的登录密码：</label>-->
                            <!--<div class="col-xs-4">-->
                                <!--<div class="ipt">-->
                                    <!--<input type="password" name="password" placeholder="设置密码">-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                        <!--<div class="row">-->
                            <!--<label class="col-xs-3 col-xs-offset-2">再输入一次密码：</label>-->
                            <!--<div class="col-xs-4">-->
                                <!--<div class="ipt">-->
                                    <!--<input type="password" name="re_password" placeholder="输入同一密码">-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    </form>
                </div>
                <div class="add-link text-center mt30 mb30">
                    <button class="ui-btn ui-btn-blue ui-btn-default" id="lost-ajax">提交</button>
                    <p class="lost-tips mt10 fc-red f14"></p>
                </div>
            </div>
        </div>
    </div>
</div><?php endif; ?>
<!--login e-->
<script type="text/javascript" src="/javascript/home/main.js"></script>
<?php if(($request_login == 1)): ?><script type="text/javascript">
    $('#login_dialog').modal('show');
</script><?php endif; ?>
        <script>
            $(function(){
                $("#login-close").on('click',function(){
                    var _url = window.location.href;
                    var _status=_url.indexOf('request_login');
                    if(_status == -1){
                        window.location.reload();
                    }
                })
            })
        </script>
</body>
</html>